<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>Bootstrap Admin</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="referrer" content="no-referrer"/>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="/static/lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="/static/lib/font-awesome/css/font-awesome.css">

    <script src="/static/lib/jquery-1.11.1.min.js" type="text/javascript"></script>

    <script src="/static/lib/jQuery-Knob/js/jquery.knob.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $(".knob").knob();
        });
    </script>

    <link rel="stylesheet" type="text/css" href="/static/stylesheets/theme.css">
    <link rel="stylesheet" type="text/css" href="/static/stylesheets/premium.css">

</head>

<body class=" theme-blue">

<!-- Demo page code -->

<script type="text/javascript">
    $(function () {
        var match = document.cookie.match(new RegExp('color=([^;]+)'));
        if (match) var color = match[1];
        if (color) {
            $('body').removeClass(function (index, css) {
                return (css.match(/\btheme-\S+/g) || []).join(' ')
            })
            $('body').addClass('theme-' + color);
        }
    })

    $('[data-popover="true"]').popover({
        html: true
    })
</script>
<style type="text/css">
    #line-chart {
        height: 300px;
        width: 800px;
        margin: 0px auto;
        margin-top: 1em;
    }

    .navbar-default .navbar-brand,
    .navbar-default .navbar-brand:hover {
        color: #fff;
    }
</style>

<div class="navbar navbar-default" role="navigation" style="height: 80px;">
    <div class="navbar-header">
        <a class=""><span class="navbar-brand" style="font-size: 20px;font-weight:bold;"><img
                src="/static/images/schoolBadge.png"
                style="height: 55px;width: 55px" alt=""/> 干部信息录入系统</span></a>
    </div>
    <div class="navbar-collapse collapse" style="height: 1px;">
        <ul id="main-menu" class="nav navbar-nav navbar-right">
            <li class="dropdown hidden-xs">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <span class="glyphicon glyphicon-user padding-right-small"
                          style="position:relative;height: 49px;"></span>{{ user.user_name }}
                    <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu">
                    <li>
                        <a tabindex="-1" href="/user_login/">注销</a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
</div>

<div class="sidebar-nav">
    <ul>
        <li>
            <a href="#" class="nav-header" data-toggle="collapse"><i class="fa fa-fw fa-dashboard"></i> 信息管理</i>
            </a>
        </li>
        <li>
            <ul class="dashboard-menu nav nav-list collapse in">
                <li>
                    <a href="/user_index/"><span class="fa fa-caret-right"></span>个人信息</a>
                </li>
                <li>
                    <a href="/user_edit/"><span class="fa fa-caret-right"></span>修改信息</a>
                </li>
                <li>
                    <a href="/user_eva/"><span class="fa fa-caret-right"></span>评奖评优</a>
                </li>
            </ul>
        </li>
    </ul>
</div>
<div class="content">
    <div class="header">
        <h1 class="page-title">修改用户</h1>
    </div>
    <div class="main-content">

        <ul class="nav nav-tabs">
            <li class="active">
                <a href="#home" data-toggle="tab">修改信息</a>
            </li>
            <li>
                <a href="#profile" data-toggle="tab">修改密码</a>
            </li>
        </ul>
    </div>

    <div class="row">
        <div class="col-md-4">
            <br>
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane active in" id="home">
                    <form id="edittab" method="POST" enctype="multipart/form-data"
                          action="/user_edit/">
                        <div class="form-group">
                            <label>姓名</label>
                            <input type="text" class="form-control" name="user_name" id="ed1"
                                   value="{{ user.user_name }}">
                        </div>
                        <div class="form-group">
                            <label>性别</label>
                            <input type="text" class="form-control" name="user_sex" id="ed2"
                                   value="{{ user.user_sex }}">
                        </div>
                        <div class="form-group">
                            <label>出生年月</label>
                            <input type="text" class="form-control" name="user_birth" id="ed3"
                                   value="{{ user.user_birth }}">
                        </div>

                        <div class="form-group">
                            <label>联系方式</label>
                            <input type="text" class="form-control" name="user_phone" id="ed5"
                                   value="{{ user.user_phone }}">
                        </div>

                        <div class="form-group">
                            <label>邮箱地址</label>
                            <input type="text" class="form-control" name="user_email" id="ed6"
                                   value="{{ user.user_email }}">
                        </div>
                        <div class="form-group">
                            <label>籍贯</label>
                            <input type="text" class="form-control" name="user_birthplace" id="ed7"
                                   value="{{ user.user_birthplace }}">
                        </div>
                        <div class="form-group">
                            <label>所在单位</label>
                            <input type="text" class="form-control" name="user_unit" id="ed8"
                                   value="{{ user.user_unit }}">
                        </div>
                        <div class="form-group">
                            <label>证件照片</label>
                            <input type="file" class="form-control" name="user_photo" id="ed10">
                        </div>
                        <div class="modal-footer">
                            <input type="submit" class="btn btn-danger" name="修改" value="修改">
                        </div>
                    </form>
                </div>

                <div class="tab-pane fade" id="profile">

                    <form id="tab2" action="/user_edit_pwd/" method="POST">
                        <div class="form-group">
                            <label>新密码</label>
                            <input type="password" class="form-control" name="pwd1">
                            <label>确认密码</label>
                            <input type="password" class="form-control" name="pwd2">
                        </div>
                        <div>
                            <input type="submit" class="btn btn-danger" value="修改">
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/static/lib/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript">
    $("[rel=tooltip]").tooltip();
    $(function () {
        $('.demo-cancel-click').click(function () {
            return false;
        });
    });
</script>
{% if messages %}
    <script type="text/javascript">
        {% for msg in messages %}
            alert('{{ msg.message }}');
        {% endfor %}
    </script>
{% endif %}
</body>
</html>